package cn.anzhiyublog.staranimegallery.mapper;

import cn.anzhiyublog.staranimegallery.model.domain.Space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * 空间mapper
 *
 * @author 安知一只鱼
 */
public interface SpaceMapper extends BaseMapper<Space> {
    /**
     * 通过空间id查询所属用户id
     */
    @Select("select user_id from space where id = #{spaceId}")
    Long getUserIdBySpaceId(Long spaceId);
}
